package com.cmfi.dao.userRoleAuthDao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.cmfi.domain.userRoleAuthEntity.MenuAuth;

// TODO 添加@Mapper
@Mapper
public interface MenuAuthDao {

	@Select("select * from tbl_menu_auth where id = #{id} limit 1")
	public MenuAuth getMenuAuthById(Long id);
	
	@Select("select * from tbl_menu_auth where menuName = #{menuName} limit 1")
	public MenuAuth getPermissionByName(String menuName);

	@Insert("insert into tbl_menu_auth(menuName,remark) values(#{menuName},#{remark})")
	public int savePermission(MenuAuth permission);
}
